package cn.iocoder.yudao.module.asset.controller.admin.manager.vo;

import cn.iocoder.yudao.module.asset.enums.DictTypeConstants;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

import static cn.iocoder.yudao.module.asset.enums.DictTypeConstants.*;

@Schema(description = "管理后台 - 资产管理 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ManagerRespVO {

    @Schema(description = "数据id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16890")
    @ExcelProperty("数据id")
    private Integer id;

    @Schema(description = "资产编号")
    @ExcelProperty("资产编号")
    private String assetNumber;

    @Schema(description = "条码编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("条码编号")
    private String barcodeNumber;

    @Schema(description = "资产名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("资产名称")
    private String title;

    @Schema(description = "资产分类", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "资产分类", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.ASSET_CLASSIFICATION) // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String assetType;

    @Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("品牌")
    private String brand;

    @Schema(description = "规格型号")
    @ExcelProperty("规格型号")
    private String specificationModel;

    @Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("数量")
    private Integer number;

    @Schema(description = "计量单位")
    @ExcelProperty(value = "计量单位", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.UNIT_OF_MEASUREMENT) // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String unitOfMeasurement;

    @Schema(description = "资产原值")
    @ExcelProperty("资产原值")
    private Double originalValue;

    @Schema(description = "生产时间")
    @ExcelProperty(value = "生产时间",format = "YYYY-MM-DD")
    @DateTimeFormat("yyyy-MM-dd")
    private LocalDateTime obtainTime;

    @Schema(description = "管理部门")
    @ExcelProperty("管理部门")
    private Integer managementDept;

    @Schema(description = "管理部门")
    @ExcelProperty("管理部门")
    private String managementDeptName;

    @Schema(description = "管理人")
    @ExcelProperty("管理人")
    private Integer managementUser;

    @Schema(description = "管理人")
    @ExcelProperty("管理人")
    private String managementUserName;

    @Schema(description = "使用部门", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("使用部门")
    private Integer useDept;

    @Schema(description = "使用部门", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("使用部门")
    private String useDeptName;

    @Schema(description = "使用人", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("使用人")
    private Integer useUser;
    @Schema(description = "使用人", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("使用人")
    private String useUserName;

    @Schema(description = "存放地点", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("存放地点")
    private String storageLocation;

    @Schema(description = "业务状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "业务状态", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.BUSINESS_STATUS) // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String businessStatus;

    @Schema(description = "成新率")
    @ExcelProperty(value = "成新率", converter = DictConvert.class)
    @DictFormat(DictTypeConstants.NEWNESS_RATE) // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String newnessRate;

    @Schema(description = "财务记账日期")
    @ExcelProperty("财务记账日期")
    @DateTimeFormat("yyyy-MM-dd")
    private LocalDateTime financialAccountingTime;

    @Schema(description = "备注", example = "随便")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "文件", example = "随便")
    private String files;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}
